<?php

namespace App\Repositories\Services;

use App\Models\Category;
use App\Repositories\Contracts\CategoryRepository;

class CategoryRepositoryService implements CategoryRepository
{
    public function index()
    {
        return Category::query()->where("parent_id", 1)->get();
    }

    public function format($item)
    {
        return $item->format();
    }
}